<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/10/26 0026
 * Time: 下午 6:48
 */function query($sql){
    if ($result = mysql_query($sql)) {
        return $result;
    }else{
        echo 'SQL执行失败:<br>';
        echo '错误的SQL为:'.$sql,'<br>';
        echo '错误的代码为:',mysql_errno(),'<br>';
        echo '错误的信息为:',mysql_error(),'<br>';
        die;
    }
}